Reflect broken symlinks in resources model - #2798
Open
iloveeclipse wants to merge 1 commit into
Open
Conversation
Contributor
iloveeclipse
force-pushed
the
broken_symlink_support
branch
from
July 29, 2026 15:21
6f6c255 to
06b408f
Compare
iloveeclipse
added a commit
to iloveeclipse/eclipse.platform.ui
that referenced
this pull request
Jul 29, 2026
Requires fix in platform, see eclipse-platform/eclipse.platform#2798 See eclipse-platform/eclipse.platform#2797
iloveeclipse
force-pushed
the
broken_symlink_support
branch
from
July 29, 2026 16:16
06b408f to
de6092f
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the Eclipse Core Resources / EFS stack so broken (dangling) symbolic links are surfaced in the workspace resource model (enabling UI overlays and user visibility/removal), including Linux-native support and accompanying regression tests.
Changes:
- Treat dangling symlinks as “present” resources in workspace tree logic and attribute lookup (so they appear in members/refresh and can be deleted).
- Preserve symlink metadata (lstat) for dangling links in Linux native implementations, and expose link target/attributes via EFS.
- Add/extend tests to validate dangling symlink visibility and “read as empty content” behavior.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/localstore/SymlinkResourceTest.java | Adds a workspace-level regression test ensuring broken symlinks appear as child IFile resources and behave safely for read APIs. |
| resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/filesystem/SymlinkTest.java | Extends filesystem-level tests for broken symlink timestamps/lengths and recursive symlink existence expectations. |
| resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceTree.java | Ensures deletes don’t treat broken symlinks as “nonexistent on disk”. |
| resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTreeNode.java | Treats symlink nodes as existing in filesystem even when targets are missing. |
| resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java | Returns ResourceAttributes for broken symlinks (instead of null). |
| resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java | Makes read APIs return empty content for dangling symlinks rather than erroring as “file not found”. |
| resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/linux/LinuxFileNatives.java | Preserves symlink-node metadata for dangling links (while keeping “target missing” exists=false semantics). |
| resources/bundles/org.eclipse.core.filesystem/natives/unix/fastlinux/fastlinuxfile.c | Retains lstat data for dangling links when following the link fails during directory listing/stat conversion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Broken file links were not present in resource model before, now they are (at least on Linux x86_64, in the future hopefully on all Unix platforms). For "broken" link overlays we need an additional patch in Platform UI. Fixes eclipse-platform#2797
iloveeclipse
force-pushed
the
broken_symlink_support
branch
from
July 30, 2026 06:35
de6092f to
fc29ebb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For link overlays we need an additional patch in Platform UI (eclipse-platform/eclipse.platform.ui#4158).
Fixes #2797